package file;

import java.io.File;
import java.io.IOException;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Home-pc
 * Date: 2023-10-02
 * Time: 10:59
 */
//文件的创建
public class Demo2 {
    public static void main(String[] args) throws IOException {
        File file=new File("D:/456.txt");
        System.out.println(file.exists());
        System.out.println(file.isDirectory());
        System.out.println(file.isFile());

        System.out.println(file.createNewFile());
        System.out.println("我是分割线");

        System.out.println(file.exists());
        System.out.println(file.isDirectory());
        System.out.println(file.isFile());
    }
}
